package com.ruoyi.system.domain;

import java.io.Serializable;

import javax.persistence.*;

import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.hibernate.annotations.GenericGenerator;

/**
 * 用户和角色关联 sys_role_user
 * 
 * @author ruoyi
 */
@Entity
@Table(name = "sys_role_user")
@GenericGenerator(name = "uuid2", strategy = "com.ruoyi.common.utils.IDUtils")
public class SysRoleUser extends BaseEntity
{
	@Id
    @Column(nullable = false, length = 19, columnDefinition = "char")
    @GeneratedValue(strategy = GenerationType.IDENTITY,generator = "uuid2")
	private String pkRoleUser;
	
    /** 用户ID */
    @Column(nullable = false, length = 19, columnDefinition = "char")
    private String userId;
    
    /** 角色ID */
    @Column(nullable = false, length = 19, columnDefinition = "char")
    private String roleId;

    public String getUserId()
    {
        return userId;
    }

    public void setUserId(String userId)
    {
        this.userId = userId;
    }

    public String getRoleId()
    {
        return roleId;
    }

    public void setRoleId(String roleId)
    {
        this.roleId = roleId;
    }

    public String getpkRoleUser() {
		return pkRoleUser;
	}

	public void setPkRoleUser(String pkRoleUser) {
		this.pkRoleUser = pkRoleUser;
	}

	@Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("userId", getUserId())
            .append("roleId", getRoleId())
            .toString();
    }
}
